package com.starry.designPatterns.creatation.builder;

/**
 * @Author Francis
 * @Date 2022-08-31 23:27
 **/
public class XiaoMiBuilder  extends AbstractBuilder{
    public XiaoMiBuilder(){
        phone = new Phone();
    }

    public static XiaoMiBuilder builder(){
        return new XiaoMiBuilder();
    }

    @Override
    AbstractBuilder customCpu(String cpu) {
        phone.cpu = cpu;
        return this;

    }

    @Override
    AbstractBuilder customMem(String mem) {
        phone.mem = mem;
        return this;
    }

    @Override
    AbstractBuilder customDisk(String disk) {
        phone.disk = disk;
        return this;
    }

    @Override
    AbstractBuilder customCam(String cam) {
        phone.cam = cam;
        return this;
    }
}
